﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace VPN
{
    public partial class TransferCount : MPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataView dv = VPN.Querier.DBHelper.GetAllQuotas();
                for (int i = dv.Count - 1; i >= 0; i--)
                {
                    string s = VPN.Querier.UserHelper.GetUserName(dv[i]["Client"].ToString());
                    if (s.StartsWith("["))
                    {
                        dv[i].Delete();
                    }
                    else
                    {
                        dv[i]["Client"] = s;
                    }
                }
                dv.Sort = "Client";
                gvList.DataSource = dv;
                gvList.DataBind();
            }
        }



    }
}
